import 'package:json_annotation/json_annotation.dart';

part 'user_body_property.g.dart';

@JsonSerializable()
class UserBodyModel {
  final List<UserBodyDataInfo> data;

  UserBodyModel(
    this.data,
  );

  factory UserBodyModel.fromJson(Map<String, dynamic> json) =>
      _$UserBodyModelFromJson(json);

  Map<String, dynamic> toJson() => _$UserBodyModelToJson(this);
}

@JsonSerializable()
class UserBodyDataInfo {
  final String propertyId;
  final String name;
  final String type;
  final int value;
  final String iconUrl;
  final String skillType;
  final int weightPercent;
  final int bodyMin;
  final int bodyMax;
  final int criticalValue;
  final String criticalDesc;
  final int level;
  final int min;
  final int max;
  final String title;
  final int percent;

  ///1 骨瘦如柴； 2 身材偏瘦； 3 完美身材; 4 身体偏胖； 5 肥胖如猪
  final int weightGrade;
  final String weightType;
  final String desc;
  final String studyId;
  final String achieve;
  final dynamic effect;
  final String illPropertyId;
  final dynamic illness;
  final String weightPropose;

  UserBodyDataInfo(
      this.propertyId,
      this.name,
      this.type,
      this.value,
      this.iconUrl,
      this.skillType,
      this.weightPercent,
      this.bodyMin,
      this.bodyMax,
      this.criticalValue,
      this.criticalDesc,
      this.level,
      this.min,
      this.max,
      this.title,
      this.percent,
      this.desc,
      this.studyId,
      this.achieve,
      this.effect,
      this.illPropertyId,
      this.illness,
      this.weightPropose,
      this.weightGrade,
      this.weightType);

  factory UserBodyDataInfo.fromJson(Map<String, dynamic> json) =>
      _$UserBodyDataInfoFromJson(json);

  Map<String, dynamic> toJson() => _$UserBodyDataInfoToJson(this);
}
